﻿using System.ComponentModel.DataAnnotations;
using Xcj.Mes.WholeLine.DataBase.Common;

namespace Xcj.Mes.WholeLine.DataBase.Entity
{
    public class AlarmConfigEntity : BaseEntity
    {
        // 钉卷 组立 老化 座板 其它
        private string _deviceType = string.Empty;
        [Alias("设备类型"), StringLength(32)]
        public string DeviceType
        {
            get => _deviceType;
            set
            {
                _deviceType = value?.Trim();
                RaisePropertyChanged();
            }
        }
        
        private string _address = string.Empty;
        [Alias("报警地址"), StringLength(32)]
        public string Address
        {
            get => _address;
            set
            {
                _address = value?.Trim();
                RaisePropertyChanged();
            }
        }

        private string _code = string.Empty;
        [Alias("报警编码"), StringLength(32)]
        public string Code
        {
            get => _code;
            set
            {
                _code = value?.Trim();
                RaisePropertyChanged();
            }
        }
        
        private string _content = string.Empty;
        [Alias("报警内容"), StringLength(256)]
        public string Content
        {
            get => _content;
            set
            {
                _content = value?.Trim();
                RaisePropertyChanged();
            }
        }
        
        private string _level = string.Empty;
        [Alias("报警等级"), StringLength(32)]
        public string Level
        {
            get => _level;
            set
            {
                _level = value?.Trim();
                RaisePropertyChanged();
            }
        }

        private bool _isAlarm = false;
        [Alias("是否发生报警")]
        public bool IsAlarm
        {
            get => _isAlarm;
            set
            {
                _isAlarm = value;
                RaisePropertyChanged();
            }
        }
    }
}
